﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Entidades;

namespace ApuestasNetInterfaz
{
    public partial class MostrarEventos : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["login"] != null)
            {
                usuarioConectado.Text = ((Usuario)Session["login"]).Nombreusuario;
            }
        }

        protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
        {
            int index = GridView1.SelectedIndex;
            Session["idEvento"] = Convert.ToInt32(GridView1.Rows[index].Cells[1].Text);
            Response.Redirect("ModificarEvento.aspx");
        }

        protected void CerrarSesion_Click(object sender, EventArgs e)
        {
            if (Session["login"] != null)
            {
                Session["login"] = null;
                Response.Redirect("Inicio.aspx");
            }
        }

      
    }
}